Run the link check against the local build, not a Vercel preview - #1865
Merged
Conversation
The broken-links workflow asked the Vercel API for a PR preview URL and crawled that. With Vercel deprecated in favour of GitHub Pages there is no preview deployment, so the job pointed linkinator at a hostname that no longer resolves. Fold the check into the existing PR build job instead: linkinator serves ./build on an ephemeral localhost port, so it needs no deployed environment and reuses the build we already do rather than paying for a second one. Also fix the links:check script, which could never have worked against a local build - it skipped ".*localhost.*", and serving ./build locally makes every internal link a localhost URL, so the whole check was a no-op. Dropping that skip surfaces internal links properly. Externally, linkinator probes with HEAD and falls back to GET, but keeps the HEAD status if that GET exceeds --timeout; at the default concurrency of 100 this reported healthy links as 400/404. Lower the concurrency, raise the timeout, and treat 5xx as noise alongside 403 and 0 so the check does not go red on someone else's outage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first working run of the link check against a real build found six broken links that had accumulated while the Vercel-based job was pointing at a dead hostname. - Intuit developer portal and QuickBooks FR notice: dead URLs, replaced or unlinked - Data Coverage Explorer: knowledge.codat.io 404s, so drop the changelog entry and the post that existed only to link to it - Consent journey Figma prototype: no longer accessible - codat-docs.vercel.app self-link in a changelog post: now relative - Zoho: point at the current sign-in URL Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pmckinney-codat
marked this pull request as ready for review
July 29, 2026 16:10
|
Link check results: |
pmckinney-codat
enabled auto-merge
July 29, 2026 16:15
pj-simpson
self-requested a review
July 30, 2026 08:10
pj-simpson
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The broken-links workflow asked the Vercel API for a PR preview URL and crawled that. With Vercel deprecated in favour of GitHub Pages there is no preview deployment, so the job was pointing linkinator at a hostname that no longer resolves.
What
Check the local build instead of a preview deployment.
check-links.ymlis gone; the check now runs at the end of the existingpr.ymlbuild job. Linkinator serves./buildon an ephemeral localhost port, so it needs no deployed environment and reuses the build we already do rather than paying for a second one. Thecodatbotskip, the previous-comment cleanup and the fail-on-broken-links behaviour all carry over.workflow_dispatchis kept, though a manual run now checks a fresh build rather than the live site.Fix
links:check, which could never have worked locally. It skipped.*localhost.*, and serving./buildlocally makes every internal link a localhost URL — so the whole check was a no-op. Dropping that skip is what surfaced the links below.Stop external hosts making the check flaky. Linkinator probes with HEAD and falls back to GET, but keeps the HEAD status if that GET exceeds
--timeout. At the default concurrency of 100 that reported healthy links as 400/404 (api.codat.io/swagger/...andaccounts.zoho.com/signinboth doGET200 /HEAD400). Lowered concurrency, raised the timeout, and 5xx now joins 403 and 0 as noise so the check doesn't go red on someone else's outage.Fixed the six real broken links it found — dead Intuit and QuickBooks FR URLs, a 404ing Data Coverage Explorer link (and the changelog post that existed only to link to it), an inaccessible Figma prototype, and a
codat-docs.vercel.appself-link now made relative.Verification
Ran a full build plus link check locally. Internal links are clean, and broken entries dropped from 1,648 to 109 — all of which are the filtered 403/0/5xx noise, with no genuine failures left.
Follow-ups, deliberately not in here
onBrokenLinks/onBrokenAnchorsare both"warn"indocusaurus.config.js). Linkinator won't catch the anchors either, as--check-fragmentsis off.VERCEL_TOKEN,VERCEL_TEAM_IDandVERCEL_PROJECT_IDare now unused repo secrets and can be removed.🤖 Generated with Claude Code